package com.dou361.ijkplayer.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;

import com.dou361.ijkplayer.listener.HeartTouchListener;

/**
 * Created by Administrator on 2017/8/14.
 */

public class HeartRela extends RelativeLayout {
    private HeartTouchListener listener;
    public HeartRela(Context context) {
        super(context);
    }

    public HeartRela(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public HeartRela(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

//    @Override
//    public boolean dispatchTouchEvent(MotionEvent ev) {
//        switch (ev.getAction()){
//            case MotionEvent.ACTION_DOWN:
//                listener.onTouch(ev);
//                break;
//            case MotionEvent.ACTION_CANCEL:
//            case MotionEvent.ACTION_UP:
//                Log.d("zzz","cancle");
//                return false;
//        }
//        Log.d("zzz","reladis");
//        return super.dispatchTouchEvent(ev);
//    }
//    public void setListener(HeartTouchListener listener){
//        this.listener=listener;
//    }

//    @Override
//    public boolean onInterceptTouchEvent(MotionEvent ev) {
//        Log.d("zzz","relain");
//        return super.onInterceptTouchEvent(ev);
//    }
}
